package com.lyq;

import org.mybatis.spring.annotation.MapperScan;
import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication;
import org.springframework.boot.web.servlet.ServletComponentScan;
import org.springframework.web.servlet.config.annotation.WebMvcConfigurer;

/**
 * @Author:liangyunqian
 * @Date: ${DATE}  ${TIME}
 * @Description:
 */
@SpringBootApplication
@MapperScan("com.lyq.*.mapper")              //扫描mapper接口
@ServletComponentScan("com.lyq.listener")  //扫描监听器
public class CrmAppStart implements WebMvcConfigurer {
    public static void main(String[] args) {
        SpringApplication.run(CrmAppStart.class,args);
    }

    /*@Autowired
    private LoginInterceptor loginInterceptor;

    @Override
    public void addInterceptors(InterceptorRegistry registry) {
        registry.addInterceptor(loginInterceptor)
                .addPathPatterns("/**")      // 要拦截的path
                .excludePathPatterns("/login","/logout","/swagger-ui.html");   // 放行的path
    }*/
}